package com.huaxin.device.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huaxin.device.dto.ResponseResult;
import com.huaxin.device.dto.request.DeviceDataCollectionWideAddDTO;
import com.huaxin.device.dto.request.DeviceDataCollectionWideQueryByDataTypePageListReqDTO;
import com.huaxin.device.models.DeviceDataCollectionWide;

import java.util.List;
import java.util.Map;

public interface DeviceDataCollectionWideService extends IService<DeviceDataCollectionWide> {
    //添加设备数据
    boolean addDeviceData(List<DeviceDataCollectionWideAddDTO> deviceDataCollectionWide, String stationNumber);

    //查询设备数据
    Page<DeviceDataCollectionWide> queryDeviceData(Integer pageNum, Integer pageSize, String deviceId, String stationNumber);

    //查询设备指定数据
    ResponseResult<IPage<Map<String, Object>>> queryDeviceDataByDataType(DeviceDataCollectionWideQueryByDataTypePageListReqDTO in);

    // 查询设备最新的监控指标数据
    Object getLatestByDeviceId(Long deviceId, String metricField);
}
